import { Direction, Page, Record } from '@/typings';

export interface CrudSearch {
  page: number,
  size: number,
  dir: Direction,
  sort?: string,
  searchInfo?: {},
  id: string
}

export type CrudPage = Page<Record>

export interface CrudInfo {
  id?: string,
  [name: string]: any
}
export interface CrudAppd {
  id?: string,
  [name: string]: any,
}
export interface CrudDic {
  [name: string]: any
}

export interface CrudState {
    uri: string,
    search: CrudSearch,
    defaultSearch: CrudSearch,
    page: CrudPage,
    dic: CrudDic,
    info: CrudInfo,
    appd: CrudAppd,
    isModify: boolean,
}

export interface CrudStates {
  [name: string]: CrudState
}

